package com.sleepcamel.resteasyConfigurator.util;

import java.net.URL;

import org.eclipse.jface.resource.ImageDescriptor;

abstract public class ImageDescriptorProvider {

	public static ImageDescriptor getImageDescriptor(String name) {
		String iconPath = "icons/";
		URL url = ImageDescriptorProvider.class.getClassLoader().getResource(iconPath+name);
		if (url != null)
			return ImageDescriptor.createFromURL(url);
		else
			return ImageDescriptor.getMissingImageDescriptor();
	}
}
